<{extend name="public/layout"}>



<{block name="content"}>
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <div class="container-fluid">
            <div class="row mb-2">
                <div class="col-sm-6">
                    <h1></h1>
                </div>
                <div class="col-sm-6">
                    <ol class="breadcrumb float-sm-right">
                        <li class="breadcrumb-item"><a href="<{:url('/admin/index/index')}>">首页</a></li>
                        <li class="breadcrumb-item">日志管理</li>
                        <li class="breadcrumb-item active">队列记录</li>
                    </ol>
                </div>
            </div>
        </div><!-- /.container-fluid -->
    </section>

    <!-- Main content -->
    <section class="content">
        <div class="container-fluid">
            <div class="card">
                <!-- /.card-header -->
                <div class="card-body">
                    <table id="my_table" class="table table-bordered table-striped">
                        <thead>
                        <tr>
                            <th>#</th>
                            <th>类名</th>
                            <th>方法</th>
                            <th>参数</th>
                            <th>预设时间</th>
                            <th>实际执行</th>
                            <th>执行次数</th>
                            <th>状态</th>
                            <th>执行结果</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <{if !empty($data)}>
                        <{foreach $data as $item}>
                        <tr>
                            <td><{$item.id}></td>
                            <td><{$item.class}></td>
                            <td><{$item.method}></td>
                            <td style="width: 200px"><{$item.param}></td>
                            <td><{$item.start_time|date="Y-m-d H:i:s",###}></td>
                            <td><{$item.real_time|date="Y-m-d H:i:s",###}></td>
                            <td><{$item.try_count}></td>
                            <td style="width: 200px"><{$item.result}></td>
                            <td>
                                <{if($item.status=='1')}>
                                <span class="bs-green">执行完成</span>
                                <{elseif $item.status=='-1'}>
                                <span class="bs-grey">已取消</span>
                                <{else}>
                                <span class="bs-blue">待执行</span>
                                <{/if}>
                            </td>
                            <td>

                            </td>
                        </tr>
                        <{/foreach}>
                        <{/if}>



                        </tbody>

                    </table>
                </div>
                <div class="card-footer">
                    <{$page?$page->render():''}>
                </div>
                <!-- /.card-body -->
            </div>
        </div>
    </section>
    <!-- /.content -->
</div>
<{/block}>
<{block name="script"}>
<script>
    $(function () {

        $("#my_table").DataTable({
            "ordering": false,//禁用排序
            "responsive": true,
            "lengthChange": false,
            "autoWidth": false,
            //"buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"],
            // "pageLength": 10,         //初始化显示几条数据
            //serverSide: true, // use local process instead of server
            // bFilter: true, // show top right search input box.
            bPaginate: false,//是否开启分页
            //iDisplayLength: 10, //默认显示的记录数
            bInfo: false,//是否显示页脚信息，DataTables插件左下角显示记录数
        }).buttons().container().appendTo('#my_table_wrapper .col-md-6:eq(0)');

    });
</script>
<{/block}>